package com.partner.boot.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import cn.hutool.core.annotation.Alias;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.partner.boot.common.LDTConfig;
import lombok.Builder;
import lombok.Getter;
import lombok.Setter;

/**
* <p>
* 
* </p>
*
* @author 菜牙买菜
* @since 2023-02-10
*/
@Getter
@Setter
@Builder
@ApiModel(value = "Chat对象", description = "")
public class Chat implements Serializable {

private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @Alias("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("用户唯一编号")
    @Alias("用户唯一编号")
    private String uid;

    @ApiModelProperty("用户名")
    @Alias("用户名")
    private String name;

    @ApiModelProperty("个性签名")
    @Alias("个性签名")
    private String sign;

    @ApiModelProperty("信息内容")
    @Alias("信息内容")
    private String context;

    @ApiModelProperty("发送的图片")
    @Alias("发送的图片")
    private String imgUrl;

    @ApiModelProperty("发送时间")
    @Alias("发送时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonDeserialize(using = LDTConfig.CmzLdtDeSerializer.class)
    @JsonSerialize(using = LDTConfig.CmzLdtSerializer.class)
    private LocalDateTime createTime;

    @ApiModelProperty("用户头像")
    @Alias("用户头像")
    private String avatar;
}